import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mobiledj_Security.settings')
django.setup()

from web import models
from web.utils.encrypt import md5

models.Users.objects.create(
    role=1,
    username='xxsdongj',
    nickname='董金',
    password=md5('ta891qhs'),
    active=1
)
# for i in range(1, 300):
#     models.Users.objects.create(
#         role=2,
#         username='xxsdongj%s' % i,
#         nickname='董金%s' % i,
#         password=md5('ta891qhs'),
#         active=1
#     )

# models.Device.objects.create(
#     title='奇安信边界防火墙',
#     url="http://192.168.101.253",
#     memo="以桥接模式部署于互联网边界,主要进行边界防护",
#     active=1
# )
